import React from 'react'
import Tianditu from '../components/tianditu/tianditu'
export default function ({ env, data, inputs, outputs, slots, style }: any) {
  /** 运行时 */
  return (
    <Tianditu
      lnglat={[data.lng, data.lat]}
      width={style.width}
      height={style.height}
      onPolygonPick={(evt) => {
        outputs['onPolygonPick']?.(evt.currentLnglats)
      }}
      onPositionPick={(evt) => {
        outputs['onPositionPick']?.(evt)
      }}
    />
  )
}
